package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import javax.swing.WindowConstants;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class vTabladePosiciones extends javax.swing.JFrame {
	private JPanel pnlTabladePosiciones;
	private JScrollPane scpTabladePosiciones;
	private JButton btnSalir;
	private JTable tblTabladePosiciones;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				vTabladePosiciones inst = new vTabladePosiciones();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public vTabladePosiciones() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setTitle("Tabla de Posiciones");
			{
				pnlTabladePosiciones = new JPanel();
				getContentPane().add(pnlTabladePosiciones, BorderLayout.CENTER);
				{
					scpTabladePosiciones = new JScrollPane();
					pnlTabladePosiciones.add(scpTabladePosiciones);
					scpTabladePosiciones.setPreferredSize(new java.awt.Dimension(475, 234));
					{
						TableModel tblTabladePosicionesModel = new DefaultTableModel();
						tblTabladePosiciones = new JTable();
						scpTabladePosiciones.setViewportView(tblTabladePosiciones);
						tblTabladePosiciones.setModel(tblTabladePosicionesModel);
					}
				}
				{
					btnSalir = new JButton();
					pnlTabladePosiciones.add(btnSalir);
					btnSalir.setText("Salir");
					btnSalir.setPreferredSize(new java.awt.Dimension(62, 34));
				}
			}
			pack();
			this.setSize(527, 382);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	//-----Accion del Boton Salir-------------------
	public void addActionListener(ActionListener accion) {
		btnSalir.addActionListener(accion);
	}


	public void setListado(AbstractTableModel modeloTabla) {
		tblTabladePosiciones.setModel(modeloTabla);
	}


}
